#include <cmath>
#include <iostream>
using namespace std;

bool tag[1001] = {};
long long num[200001] = {};
int T;
int n;

int main() {
    for (int i = 1; i < 199999; ++i) {
        for (int j = i; j < 200000; j += i) {
            num[j] += i;
        }
    }

    for (int i = 1; i < 200001; ++i) {
        if (num[i] <= 1000)
            tag[num[i]] = 1;
    }
    cin >> T;
    while (T--) {
        cin >> n;
        if (tag[n] == 1) {
            cout << "no" << endl;
        } else {
            cout << "yes" << endl;
        }
    }
    return 0;
}
